import request from '@/utils/request'

export default {
  getMenuList() {
    return request({
      url: '/system/menu/list',
      method: 'get'
    })
  },
  getMenuOptions() {
    return request({
      url: '/system/menu/options',
      method: 'get'
    })
  },
  createMenu(data) {
    return request({
      url: '/system/menu/create',
      method: 'post',
      data
    })
  },
  updateMenu(data) {
    return request({
      url: `/system/menu/update/${data.id}`,
      method: 'put',
      data
    })
  },
  deleteMenu(data) {
    return request({
      url: `/system/menu/delete`,
      method: 'delete',
      data
    })
  }
}
